package com.leyou.common.vo;

import com.leyou.common.enums.ExceptionEnum;
import lombok.Data;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

@Data
public class ExceptionResult {

    private int status;
    private String msg;
    private String timetamp;
    public ExceptionResult(ExceptionEnum em) {
        this.status = em.getCode();
        this.msg = em.getMsg();
        this.timetamp = new SimpleDateFormat("yyyy-MM-dd").format(new Date());;//System.currentTimeMillis()
    }
}
